<?php
//文章资讯
class articleMod extends commonMod
{
	public function __construct()
	{
		parent::__construct();
	}
//获取文章列表
	public function getList($condition,$limit)
	{

		return	$list=$this->model->field('id,title')->table('article')->where($condition)->limit($limit)->order('id desc')->select();
		
	}
	
//显示文章内容
	public function show()
	{
		$id=intval($_GET[0]);//文章id
		if(empty($id))
		{
			$this->error('参数传递有误');
		}
		$condition['id']=$id;
    	$info=$this->model->table('article')->where($condition)->find();
		$info['content']=html_out($info['content']);
		$this->assign('info',$info);
		$this->display();
	}

}
?>